<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <!-- 1.在遍历对象的过程中，如果只是获取一个值，那么获取到的是value -->
    <ul>
      <li v-for="item in info">{{item}}</li>
    </ul>

    <!-- 2.获取key和value 格式:(value, key) 按顺序写 -->
    <ul>
      <li v-for="(value, key) in info">{{key}} - {{value}}</li>
      <!-- <li v-for="(key, value) in info">{{key}} - {{value}}</li> -->
    </ul>

    <!-- 3.获取到key value index 格式:(value, key, index) -->
    <ul>
      <li v-for="(value, key, index) in info">{{value}}-{{key}}-{{index}}</li>
    </ul>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        info: {
          name: 'zach',
          age: 18,
          height: 1.82
        }
      },
  })
  </script>
</body>
</html>